home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-12-14 | 3.6 KB | 76 lines | [TEXT/EDIT] |
- ; ............ A SCOOPS OBJECT SYSTEM IN MACSCHEME: README.DOC ............
- ;
- ;
- ;The included code was prepared by John Ulrich and is distributed by Semantic
- ;Microsystems as a service to the Scheme community. You may copy, modify,
- ;and distribute it provided you include this notice in any copy or modified
- ;copy. This code should not be regarded as any sort of endorsement of SCOOPS
- ;as an object system for Scheme. Semantic intends to support a Scheme
- ;object system standard if and when one is adopted by the Scheme committee.
- ;
- ;SCOOPS was originally specified and implemented by Texas Instruments for
- ;PCScheme. By implementing SCOOPS in MacScheme I hope to help those who
- ;are porting code between the two Scheme dialects. I have attempted to
- ;follow the specification as given in the PCScheme manual; however, there
- ;will likely be some subtle differences. Any discovered differences between
- ;the PCScheme and the MacScheme implementations should be brought to my
- ;attention.
-
- ;For those familiar with SCOOPS, files readme.doc and examples.sch
- ;will get you started. Those unfamiliar with SCOOPS should also read
- ;the TI documentation found in scoops.doc.part1 and scoops.doc.part2.
- ;
- ;
- ;
- ; John Ulrich
- ; P.O. Box 748
- ; Menlo Park
- ; CA 94025
- ;
- ; November,1987
- ;
- ;
- ;
- ;I have added a few features to those of the original SCOOPS. In the PCScheme
- ;implementation, the send and send-if-handles special forms do not accept
- ;first class objects as messages. Therefore I have included two new
- ;functions, called send: and send-if-handles:. The function forms will be
- ;preferred in those cases where the message passed to an object is determined
- ;by a computation (e.g (send: obj (if (> x y) 'max 'min))).
- ;
- ;In addition to the define-method form, the MacScheme implementation permits
- ;the inclusion of method specifications in a class definition. Unless your
- ;program requires runtime redefinition of methods, you should always use
- ;this means for defining methods and avoid using define-method. If you
- ;must use define-method, there are several things that you should know.
- ;First, define-method calls eval. MacScheme supports a compiling eval.
- ;This means that the use of define-method ammounts to recompiling parts
- ;of your code at runtime. Because of inheritance, a single define-method
- ;can lead to a recompilation of many classes. This can reduce program
- ;efficiency. Secondly, programs that use define-method cannot depend
- ;on lexical environments unless the optimization is set to 0 or 1.
- ;If your methods refer only to instance variables and class variables, you
- ;can run with the optimization set to 2 or 3 and get correct results.
- ;FInally if you use define-method (ie eval) you will not be able to make
- ;your program into a stand alone clickable application.
- ;
- ;Sometimes an object is passed a message within a tight loop. In this
- ;situation, message dispatching contributes significantly to the runtime.
- ;To cure this problem, I have included a fuction called dispatch. The
- ;form (dispatch obj msg) returns the function applied to the arguments of
- ;(send obj msg arg1 ... argn). For instance the iterative form
- ;
- ;
- ; (mapcar (dispatch obj msg) '(1 2 3 4 5))
- ;
- ;has the same effect as
- ;
- ; (mapcar (lambda (x)(send obj msg x)) '(1 2 3 4 5))
- ;
- ;without the overhead of looking up the method five times.
-
- ; [This implementation of SCOOPS calls EVAL. This means that the
- ; application builder will not be able to remove unused code once
- ; you have loaded SCOOPS. -- Semantic Microsystems.]
-
-